package cn.net.xyan.secrity.acme;

import java.io.Writer;
import java.security.KeyPair;
import java.util.Collection;

public class AcmeCertReq {

    public static  final String ACME_STAGING_URL= "acme://letsencrypt.org/staging";
    public static  final String ACME_URL= "acme://letsencrypt.org";

    // RSA key size of generated key pairs
    public static final int KEY_SIZE = 2048;

    KeyPair userKey;
    KeyPair domainKey;
    Collection<String> domains;
    String acmeURL = ACME_STAGING_URL;
    String keyIdentifier;

    Writer outputWriter;
    Writer csrWriter;

    ChallengeHandler handler;

    public KeyPair getUserKey() {
        return userKey;
    }

    public void setUserKey(KeyPair userKey) {
        this.userKey = userKey;
    }

    public KeyPair getDomainKey() {
        return domainKey;
    }

    public void setDomainKey(KeyPair domainKey) {
        this.domainKey = domainKey;
    }

    public Collection<String> getDomains() {
        return domains;
    }

    public void setDomains(Collection<String> domains) {
        this.domains = domains;
    }

    public Writer getOutputWriter() {
        return outputWriter;
    }

    public void setOutputWriter(Writer outputWriter) {
        this.outputWriter = outputWriter;
    }

    public ChallengeHandler getHandler() {
        return handler;
    }

    public void setHandler(ChallengeHandler handler) {
        this.handler = handler;
    }

    public String getAcmeURL() {
        return acmeURL;
    }

    public void setAcmeURL(String acmeURL) {
        this.acmeURL = acmeURL;
    }

    public Writer getCsrWriter() {
        return csrWriter;
    }

    public void setCsrWriter(Writer csrWriter) {
        this.csrWriter = csrWriter;
    }

    public String getKeyIdentifier() {
        return keyIdentifier;
    }

    public void setKeyIdentifier(String keyIdentifier) {
        this.keyIdentifier = keyIdentifier;
    }
}
